﻿using UnityEngine;
using System.Collections;

/// <summary>
/// 技能
/// </summary>
public abstract class Skill {
    public PlayerController master;
    public string skillname;
    public string armatureName;
    public Texture2D skillIcon;
    public float beforeCast = 0;
    public float castTime = 0;
    public float afterCast = 0;
    

    /// <summary>
    /// 
    /// </summary>
    /// <param name="skillname">技能名</param>
    /// <param name="armatureName">动画名</param>
    /// <param name="skillIcon">技能图标</param>
    /// <param name="beforeCast">前摇</param>
    /// <param name="castTime">吟唱时间</param>
    /// <param name="afterCast">后摇</param>
    public Skill(PlayerController master,string skillname, string armatureName =  Armature.STAND, Texture2D skillIcon = null,
        float beforeCast = 0, float castTime = 0, float afterCast = 0)
    {
        this.master = master;
        this.skillname = skillname;
        this.armatureName = armatureName;
        this.skillIcon = skillIcon;
        this.beforeCast = beforeCast;
        this.castTime = castTime;
        this.afterCast = afterCast;
    }

    public abstract bool doSkill();
    public abstract bool stop();
}
